using System;

using DesignByContract;

namespace Outcoding.GraphGenerator.Entities {
    public class Point
    {

        #region Private Helper Classes (1)
        private class Constants
        {
            public const string DEFAULT_FONT_NAME = "Arial";
            public const int DEFAULT_FONT_SIZE = 10;
            public const bool DEFAULT_FONT_DECORATION_VALUE = false;
            public const PPAlignment DEFAULT_HALIGN_VALUE = PPAlignment.ppAlignCenter;
            public const string DEFAULT_FONT_COLOR = @"#000000";
        }
        #endregion

        #region Constructors

        public Point() {
        }

        #endregion

        private double mValue;

        public double Value {
            get { 
                return mValue; 
            }
            set { 
                mValue = value; 
            }
        }

        private Label mLabel;

        public Label Label
        {
            get { return mLabel; }
            set { mLabel = value; }
        }

        private bool mUseText = false;

        public bool UseText
        {
            get { return mUseText; }
            set { mUseText = value; }
        }

        private PPAlignment mHorizontalAlignment = Constants.DEFAULT_HALIGN_VALUE;

        public PPAlignment HorizontalAlignment
        {
            get
            {
                return mHorizontalAlignment;
            }
            set
            {
                mHorizontalAlignment = value;
            }
        }

        private string mFontName = Constants.DEFAULT_FONT_NAME;

        public string FontName
        {
            get
            {
                return mFontName;
            }
            set
            {
                mFontName = value;
            }
        }

        private int? mFontSize = Constants.DEFAULT_FONT_SIZE;

        public int? FontSize
        {
            get
            {
                return mFontSize;
            }
            set
            {
                Check.Ensure(value > 0, "Size value cannot be less than zero.", new ArgumentOutOfRangeException());
                mFontSize = value;
            }
        }

        private bool? mIsFontBold = Constants.DEFAULT_FONT_DECORATION_VALUE;

        public bool? IsFontBold
        {
            get
            {
                return mIsFontBold;
            }
            set
            {
                mIsFontBold = value;
            }
        }

        private bool? mIsFontItalic = Constants.DEFAULT_FONT_DECORATION_VALUE;

        public bool? IsFontItalic
        {
            get
            {
                return mIsFontItalic;
            }
            set
            {
                mIsFontItalic = value;
            }
        }

        private bool? mIsFontUnderline = Constants.DEFAULT_FONT_DECORATION_VALUE;

        public bool? IsFontUnderline
        {
            get
            {
                return mIsFontUnderline;
            }
            set
            {
                mIsFontUnderline = value;
            }
        }

        private long mColor = Util.ColorTranslation(Constants.DEFAULT_FONT_COLOR);

        public long Color
        {
            get { return mColor; }
            set { mColor = value; }
        }
    }
}
